﻿// 1.1.6.05.Write a program that reads a number N and calculates the sum of the first N members of the
// sequence of Fibonacci: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, …

using System;

class FibonacciSumSequence
{
    static void Main()
    {
        int userInput = int.Parse(Console.ReadLine());

        int oddFibMember = 0;
        int evenFibMember = 1;
        int sumFibMembers = 0;
        for (int fibMember = 1; fibMember <= userInput; fibMember++)
        {
            if (fibMember % 2 != 0)
	        {
                sumFibMembers += oddFibMember;
                oddFibMember += evenFibMember;
	        }
            else
            {
                sumFibMembers += evenFibMember;
                evenFibMember += oddFibMember;
            }
        }
        Console.WriteLine(sumFibMembers);
    }
}